$(function() {
	$('#vue_vm_list div').hide();
	
	loadFloorSelectBySubjectRoomId(function() {
		_addChangeListener("#floor_select", function() {
			var floorId = $('#floor_select').val();
			loadBedSelectByFloorId(floorId);
		});
	});
	
	loadBedSelectByFloorId();
});

function load_cond_subjectRoom_select() {
	if($('#subjectRoom_cond_select').length==0) {return;}

	$('#subjectRoom_cond_select').html('<option value="" selected></option>');
	$('#houseType_cond_select').html('<option value="" selected></option>');

	findAll_basic(path+'/subjectRoom/findAll', function(response) {
		for(var i=0; i<response.data.length; i++) {
			$('#subjectRoom_cond_select').append('<option value="' + response.data[i].subjectRoomId
				+ '">' + response.data[i].roomName + '</option>');
		}
		
		_addChangeListener("#subjectRoom_cond_select", function() {
			var floorId = $('#subjectRoom_cond_select').val();
			loadBedSelectByFloorId(floorId);
		});
	});
}

function deleteBatch() {
	deleteBatch_basic(path+'/elderBeHospital/deleteBatch');
}
